package utils

import (
	"encoding/json"
)

//func Unmarshal(data []byte, v interface{}) error
//func Marshal(v interface{}) ([]byte, error)
func JsonEncode(status int,msg string,data string)(string){
	response := make(map[string]interface{})
	response["stauts"] = status
	response["msg"] = msg
	response["data"] = data
	jsonStr,err := json.Marshal(response)
	if err != nil {
		return string(err.Error())
	}else{
		return string(jsonStr)
	}
}